package es.cea.web;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import com.google.appengine.api.datastore.Key;
@Entity()
public class ComentarioChat implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2737379097417692517L;
	Key id;
	Date date;
	String texto;
	UsuarioChat autor;
	

	
	public ComentarioChat() {
		
	}
	@Id()
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Key getId() {
		return id;
	}

	public void setId(Key id) {
		this.id = id;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getTexto() {
		return texto;
	}

	public void setTexto(String texto) {
		this.texto = texto;
	}
	@ManyToOne()
	public UsuarioChat getAutor() {
		return autor;
	}

	public void setAutor(UsuarioChat autor) {
		this.autor = autor;
	}
	@Override
	public String toString() {
		return "ComentarioChat [id=" + id + ", date=" + date + ", texto="
				+ texto + ", autor=" + autor + "]";
	}
	
	
}
